package com.woody.aggregate.app.web.shop.es;

import com.woody.aggregate.application.service.shop.es.EsShopQueryService;
import com.woody.aggregate.shop.api.EsShopQueryApi;
import com.woody.aggregate.shop.req.es.EsShopListRequest;
import com.woody.aggregate.shop.req.es.EsVipShopListRequest;
import com.woody.aggregate.shop.req.es.QueryEsShopByIdsRequest;
import com.woody.aggregate.shop.vo.ESPageInfo;
import com.woody.aggregate.shop.vo.EsShopInfoVo;
import com.woody.base.model.Response;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import java.util.List;

/**
 * &copy; All rights Reserved
 *
 * @author wénkǎi.zhāng 2025-04-10
 */
@RestController
@RequestMapping("es/shopQuery")
@Api(tags = "查询ES中门店信息")
public class EsShopQueryController implements EsShopQueryApi {

    @Autowired
    private EsShopQueryService esShopQueryService;

    @Override
    public Response<List<EsShopInfoVo>> queryByIds(QueryEsShopByIdsRequest request) {
        return Response.success(esShopQueryService.queryByIds(request));
    }

    @Override
    public Response<ESPageInfo<EsShopInfoVo>> vipShopList(@Valid EsVipShopListRequest request) {
        return Response.success(esShopQueryService.vipShopList(request));
    }

    @Override
    public Response<ESPageInfo<EsShopInfoVo>> allShopList(EsShopListRequest request) {
        return null;
    }
}
